home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VCM / VCM.MDB / VcmComponentContainer / 18_Cabinet / wbcls1.dsr < prev    next >
Encoding:
Text File  |  1998-05-18  |  13.9 KB  |  332 lines

  1. VERSION 5.00
  2. Begin {17016CEE-E118-11D0-94B8-00A0C91110ED} wbcls1 
  3.    ClientHeight    =   4890
  4.    ClientLeft      =   0
  5.    ClientTop       =   0
  6.    ClientWidth     =   10335
  7.    _ExtentX        =   18230
  8.    _ExtentY        =   8625
  9.    MajorVersion    =   0
  10.    MinorVersion    =   8
  11.    StateManagementType=   1
  12.    ASPFileName     =   ""
  13.    DIID_WebClass   =   "{CF330DC8-60CF-11D1-B8F3-00AA00B9290D}"
  14.    DIID_WebClassEvents=   "{CF330DC7-60CF-11D1-B8F3-00AA00B9290D}"
  15.    TypeInfoCookie  =   202
  16.    BeginProperty WebItems {193556CD-4486-11D1-9C70-00C04FB987DF} 
  17.       WebItemCount    =   4
  18.       BeginProperty WebItem1 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
  19.          MajorVersion    =   0
  20.          MinorVersion    =   8
  21.          Name            =   "Template1"
  22.          DISPID          =   1280
  23.          Template        =   "Page11.htm"
  24.          Token           =   "WC@"
  25.          DIID_WebItemEvents=   "{AB17974D-86A9-11D1-BA6D-00C04FAD58AF}"
  26.          ParseReplacements=   0   'False
  27.          AppendedParams  =   ""
  28.          HasTempTemplate =   0   'False
  29.          UsesRelativePath=   -1  'True
  30.          OriginalTemplate=   "D:\webclasses\testing\Page1.htm"
  31.          TagPrefixInfo   =   2
  32.          BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
  33.             EventCount      =   1
  34.             BeginProperty Event0 {193556D3-4486-11D1-9C70-00C04FB987DF} 
  35.                Name            =   "Form1"
  36.                DISPID          =   1280
  37.                Type            =   1
  38.                OriginalHREF    =   ""
  39.                TagType         =   1310944
  40.                BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  41.                   AttribCount     =   1
  42.                   BeginProperty Attrib0 {FA6A55FC-458A-11D1-9C71-00C04FB987DF} 
  43.                      TagType         =   1
  44.                      Attribute       =   "ACTION"
  45.                      State           =   3
  46.                      TagName         =   "Form1"
  47.                      OriginalURL     =   "wcdemo.ASP"
  48.                      Parent          =   ""
  49.                      Template        =   "Template1"
  50.                      BoundEvent      =   "Form1"
  51.                      BoundItem       =   ""
  52.                      Suffix          =   ""
  53.                      UsesAnonymousName=   1
  54.                      TagNumber       =   1
  55.                   EndProperty
  56.                EndProperty
  57.             EndProperty
  58.          EndProperty
  59.          BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  60.             AttribCount     =   0
  61.          EndProperty
  62.       EndProperty
  63.       BeginProperty WebItem2 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
  64.          MajorVersion    =   0
  65.          MinorVersion    =   8
  66.          Name            =   "WebItem1"
  67.          DISPID          =   1281
  68.          Template        =   ""
  69.          Token           =   "WC@"
  70.          DIID_WebItemEvents=   "{20EE126D-8758-11D1-BA6D-00C04FAD58AF}"
  71.          ParseReplacements=   0   'False
  72.          AppendedParams  =   ""
  73.          HasTempTemplate =   0   'False
  74.          UsesRelativePath=   0   'False
  75.          OriginalTemplate=   ""
  76.          TagPrefixInfo   =   2
  77.          BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
  78.             EventCount      =   1
  79.             BeginProperty Event0 {193556D3-4486-11D1-9C70-00C04FB987DF} 
  80.                Name            =   "CustomEventInWebItem1"
  81.                DISPID          =   1280
  82.                Type            =   1
  83.                OriginalHREF    =   ""
  84.                TagType         =   0
  85.                BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  86.                   AttribCount     =   0
  87.                EndProperty
  88.             EndProperty
  89.          EndProperty
  90.          BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  91.             AttribCount     =   0
  92.          EndProperty
  93.       EndProperty
  94.       BeginProperty WebItem3 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
  95.          MajorVersion    =   0
  96.          MinorVersion    =   8
  97.          Name            =   "WebItem2"
  98.          DISPID          =   1282
  99.          Template        =   ""
  100.          Token           =   "WC@"
  101.          DIID_WebItemEvents=   "{260CB72E-8761-11D1-BA6D-00C04FAD58AF}"
  102.          ParseReplacements=   0   'False
  103.          AppendedParams  =   ""
  104.          HasTempTemplate =   0   'False
  105.          UsesRelativePath=   0   'False
  106.          OriginalTemplate=   ""
  107.          TagPrefixInfo   =   2
  108.          BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
  109.             EventCount      =   0
  110.          EndProperty
  111.          BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  112.             AttribCount     =   2
  113.             BeginProperty Attrib0 {FA6A55FC-458A-11D1-9C71-00C04FB987DF} 
  114.                TagType         =   2
  115.                Attribute       =   "SRC"
  116.                State           =   2
  117.                TagName         =   "Img1"
  118.                OriginalURL     =   "wcdemo.ASP?WCI=WebItem2&WCU"
  119.                Parent          =   ""
  120.                Template        =   "Template1"
  121.                BoundEvent      =   ""
  122.                BoundItem       =   "WebItem2"
  123.                Suffix          =   "Src"
  124.                UsesAnonymousName=   1
  125.                TagNumber       =   1
  126.             EndProperty
  127.             BeginProperty Attrib1 {FA6A55FC-458A-11D1-9C71-00C04FB987DF} 
  128.                TagType         =   2
  129.                Attribute       =   "SRC"
  130.                State           =   2
  131.                TagName         =   "Img1"
  132.                OriginalURL     =   "wcdemo.ASP?WCI=WebItem2&WCU"
  133.                Parent          =   ""
  134.                Template        =   "Template1"
  135.                BoundEvent      =   ""
  136.                BoundItem       =   "WebItem2"
  137.                Suffix          =   "Src"
  138.                UsesAnonymousName=   1
  139.                TagNumber       =   1
  140.             EndProperty
  141.          EndProperty
  142.       EndProperty
  143.       BeginProperty WebItem4 {FA6A55FE-458A-11D1-9C71-00C04FB987DF} 
  144.          MajorVersion    =   0
  145.          MinorVersion    =   8
  146.          Name            =   "WebItem3"
  147.          DISPID          =   1283
  148.          Template        =   ""
  149.          Token           =   "WC@"
  150.          DIID_WebItemEvents=   "{A43CFBA9-876D-11D1-BA6D-00C04FAD58AF}"
  151.          ParseReplacements=   0   'False
  152.          AppendedParams  =   ""
  153.          HasTempTemplate =   0   'False
  154.          UsesRelativePath=   0   'False
  155.          OriginalTemplate=   ""
  156.          TagPrefixInfo   =   2
  157.          BeginProperty Events {193556D1-4486-11D1-9C70-00C04FB987DF} 
  158.             EventCount      =   0
  159.          EndProperty
  160.          BeginProperty BoundTags {FA6A55FA-458A-11D1-9C71-00C04FB987DF} 
  161.             AttribCount     =   0
  162.          EndProperty
  163.       EndProperty
  164.    EndProperty
  165.    NameInURL       =   "wcdemo"
  166. End
  167. Attribute VB_Name = "wbcls1"
  168. Attribute VB_GlobalNameSpace = False
  169. Attribute VB_Creatable = True
  170. Attribute VB_PredeclaredId = False
  171. Attribute VB_Exposed = True
  172. Private Sub Template1_Form1()
  173.   With Response
  174.     .Write "<html>"
  175.     .Write "<body>"
  176.     .Write "The contents of this page were dynamically generated by code in Template1_Form1() procedure.  The procedure fired when you selected the button on the previous page."
  177.     .Write "<p>"
  178.     .Write "<p>"
  179.     .Write "This is a custom event for Template1</p>"
  180.     .Write "<p>"
  181.     .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
  182.     .Write "<p>"
  183.     .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
  184.     .Write "<p>"
  185.     .Write "</body>"
  186.     .Write "</html>"
  187.   End With
  188. End Sub
  189.  
  190. Private Sub Template1_ProcessTag(ByVal TagName As String, TagContents As String, SendTags As Boolean)
  191.  Dim NewContents As String
  192.  NewContents = "<p>"
  193.  NewContents = NewContents & "The contents of this page are generated by code in the following procedure.</p>"
  194.  NewContents = NewContents & "<p>"
  195.  NewContents = NewContents & "Private Sub Template1_ProcessTag(ByVal TagName As String, TagContents As String, SendTags As Boolean)</p>"
  196.  NewContents = NewContents & "<ul>"
  197.  NewContents = NewContents & "<li>TagName = " & TagName & "</li>"
  198.  NewContents = NewContents & "<li>"
  199.  NewContents = NewContents & "TagContents = " & TagContents & "</li>"
  200.  NewContents = NewContents & "<li>"
  201.  NewContents = NewContents & "SendTags = " & SendTags & "</li>"
  202.  NewContents = NewContents & "</ul>"
  203.  NewContents = NewContents & "<p>"
  204.  NewContents = NewContents & "The ProcessTag event was fired when this '<WC@NEW>HTMLTagcontents</WC@NEW>'  code in the Page11.htm of this project was parsed.  View Page11.htm to see the HTML page that caused this event to be fired.</p>"
  205.  NewContents = NewContents & "<p>"
  206.  NewContents = NewContents & "This webclass project contains one template and three custom webitems.  You are viewing the template.  There are two connected events: the button below, and the image at the bottom of the screen.  The hyperlinks below are generated dynamically with the contents of the page. </P>"
  207.  NewContents = NewContents & "Click on any of the following links for a demostration of that feature."
  208.  NewContents = NewContents & "<ul>"
  209.  NewContents = NewContents & "<li><a href = """ & URLFor(WebItem1) & """>Fire the respond event in Custom WebItem1</a>" & "</li>"
  210.  NewContents = NewContents & "<li><a href = """ & URLFor(WebItem1, "CustomEventInWebItem1") & """>Call a Custom Event in Custom WebItem1</a>" & "</li>"
  211.  NewContents = NewContents & "<li><a href = """ & URLFor(Template1, "UserEventInTemplate1") & """>Fire an HREF to UserEvent in Template1</a>" & "</li>"
  212.  URLData = "Generic"
  213.  NewContents = NewContents & "<li><a href = """ & URLFor(WebItem3) & """>We set URLData=Generic and this hyperlink calls a custom WebItem that uses URLData</a></li>"
  214.  NewContents = NewContents & "</ul>"
  215.  NewContents = NewContents & "<p>"
  216.  TagContents = NewContents
  217.  SendTags = False
  218. End Sub
  219.  
  220. Private Sub Template1_Respond()
  221.   Template1.WriteTemplate
  222. End Sub
  223.  
  224. Private Sub Template1_UserEvent(ByVal EventName As String)
  225.   With Response
  226.     .Write "<html>"
  227.     .Write "<body>"
  228.     .Write "The contents of this page were dynamically generated by code in Template1_UserEvent() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following custom event:"
  229.     .Write "<p>"
  230.     .Write "Template1_UserEvent(ByVal EventName As String)</p>"
  231.     .Write "<p>"
  232.     .Write "EventName = " & EventName & "</p>"
  233.     .Write "<p>"
  234.     .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
  235.     .Write "<p>"
  236.     .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
  237.     .Write "<p>"
  238.     .Write "</body>"
  239.     .Write "</html>"
  240.   End With
  241. End Sub
  242.  
  243. Private Sub WebClass_Start()
  244. Set NextItem = Template1
  245.  
  246. End Sub
  247. Private Sub WebItem1_CustomEventInWebItem1()
  248.    With Response
  249.     .Write "<html>"
  250.     .Write "<body>"
  251.     .Write "The contents of this page were dynamically generated by code in WebItem1_CustomEventInWebItem1() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following custom event:"
  252.     .Write "<p>"
  253.     .Write "WebItem1_CustomEventInWebItem1()</p>"
  254.     .Write "<p>"
  255.     .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
  256.     .Write "<p>"
  257.     .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
  258.     .Write "<p>"
  259.     .Write "</body>"
  260.     .Write "</html>"
  261.   End With
  262. End Sub
  263.  
  264. Private Sub WebItem1_Respond()
  265.  With Response
  266.  .Write "<html>"
  267.  .Write "<head>"
  268.  .Write "</head>"
  269.  .Write "<body>"
  270.  .Write "The contents of this page were dynamically generated by code in WebItem1_Respond() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following Respond event:"
  271.  .Write "<p>"
  272.  .Write "WebItem1_Respond()</p>"
  273.  .Write "<p>"
  274.  .Write "When you click on any hyperlink on this page, processing will shift from this event back to the Template1_Respond event.</p>"
  275.  .Write "<p>"
  276.  .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a>"
  277.  .Write "<table border=1>"
  278.  For Each Key In Request.ServerVariables
  279.    .Write "<tr><td>"
  280. ' Shows how to href on specific fields in table
  281.    .Write "<a href=" + URLFor(Template1) + ">"
  282.    .Write Key
  283.    .Write "</a>"
  284.    .Write "</td><td>"
  285.    .Write Request.ServerVariables(Key)
  286.  .Write "</td></tr>"
  287.  Next
  288. .Write "</table>"
  289. .Write "<p>"
  290. .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a>"
  291. .Write "</body>"
  292. .Write "</html>"
  293.  End With
  294. End Sub
  295. 'Code from "The Man" Kevinn
  296. Private Sub WebItem2_Respond()
  297.     Dim ba() As Byte
  298.     Dim hFile As Long
  299. 'Make this a relative path to an img on your server
  300.     hFile = FreeFile
  301. '    Open App.Path & "\carpoint.gif" For Binary As #hFile
  302.     Open App.Path & "\explorer.bmp" For Binary As #hFile
  303.     ReDim ba(LOF(hFile))
  304.     Get #hFile, , ba
  305.     Close #hFile
  306.     Response.BinaryWrite ba
  307.  
  308. End Sub
  309.  
  310. Private Sub WebItem3_Respond()
  311. With Response
  312.  .Write "<html>"
  313.  .Write "<head>"
  314.  .Write "</head>"
  315.  .Write "<body>"
  316.  .Write "The contents of this page were dynamically generated by code in WebItem3_Respond() procedure.  The procedure fired when you selected the hyperlink on the previous page, which fired the following respond event:"
  317.  .Write "<p>"
  318.  .Write "WebItem3_Respond()</p>"
  319.  .Write "<p>"
  320.  .Write "URLData = " & URLData & "</p>"
  321.  .Write "<p>"
  322.  .Write "We set the value of URLData to 'Generic' in the Template1_Respond event before you selected the hyperlink that fired this event. </p>"
  323.  .Write "<p>"
  324.  .Write "When you click the link below, processing will shift from this event back to the Template1_Respond event.</p>"
  325.  .Write "<p>"
  326.  .Write "<a href = """ & URLFor(Template1) & """>Back to Template1</a></p>"
  327.  .Write "<p>"
  328.  .Write "</body>"
  329.  .Write "</html>"
  330. End With
  331. End Sub
  332.